package org.projetjava.metier.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Bdd {
	
	private Connection connection;
	private String url = "jdbc:mysql://localhost:3306/projetjava";
	private String user = "root";
	private String passwd = "lalala";
	
	public Bdd(){
		
		try {
			
			try {
				    Class.forName( "com.mysql.jdbc.Driver" );
				} catch ( ClassNotFoundException e ) {
					e.printStackTrace();
				}
		      this.connection = DriverManager.getConnection(url, user, passwd);
 
		    } catch (SQLException e) {
		     e.printStackTrace();
		    }


	}

	public Connection getConnection() {
		return connection;
	}

	

}
